
package com.zoio.saike.repository.converter;

import com.zoio.saike.dal.dataobject.AmFileDO;
import com.zoio.saike.repository.model.AmFile;

import java.util.ArrayList;
import java.util.List;


public class AmFileRepositoryConverter {

    public static AmFileDO convert2AmFileDO(AmFile source) {
        AmFileDO target = new AmFileDO();
    
        target.setFileDate(source.getFileDate());
        target.setCreatorId(source.getCreatorId());
        target.setMiJiNo(source.getMiJiNo());
        target.setPersonName(source.getPersonName());
        target.setBoxNo(source.getBoxNo());
        target.setStype(source.getStype());
        target.setPagesAmount(source.getPagesAmount());
        target.setUrgency(source.getUrgency());
        target.setIsLocked(source.getIsLocked());
        target.setTextEntry(source.getTextEntry());
        target.setCreateTime(source.getCreateTime());
        target.setBaoGuanQi(source.getBaoGuanQi());
        target.setVectorForm(source.getVectorForm());
        target.setQuanZongNo(source.getQuanZongNo());
        target.setJianNo(source.getJianNo());
        target.setZeRenZhe(source.getZeRenZhe());
        target.setFenLeiNo(source.getFenLeiNo());
        target.setInputPerson(source.getInputPerson());
        target.setElectronicDoc(source.getElectronicDoc());
        target.setJiNo(source.getJiNo());
        target.setModifyId(source.getModifyId());
        target.setFileTypeId(source.getFileTypeId());
        target.setMiJiSelect(source.getMiJiSelect());
        target.setOrgId(source.getOrgId());
        target.setFileName(source.getFileName());
        target.setDescription(source.getDescription());
        target.setFenAmount(source.getFenAmount());
        target.setAttachment(source.getAttachment());
        target.setCompanyId(source.getCompanyId());
        target.setInputDate(source.getInputDate());
        target.setModifyTime(source.getModifyTime());
        target.setArchiveYear(source.getArchiveYear());
        target.setSorder(source.getSorder());
        target.setIsValid(source.getIsValid());
        target.setFileType(source.getFileType());
        target.setProcInstId(source.getProcInstId());
        target.setNumberNo(source.getNumberNo());
        target.setKeyword(source.getKeyword());
        target.setProcessDefId(source.getProcessDefId());
        target.setFormPath(source.getFormPath());
        
        return target;
    }

    public static List<AmFileDO> convert2AmFileDOList(Iterable<AmFile> list) {
        List<AmFileDO> results = new ArrayList();
        for(AmFile source : list) {
            results.add(convert2AmFileDO(source));
        }
        return results;
    }

    
    public static AmFile convert2AmFile(AmFileDO source) {
        AmFile target = new AmFile();
    
        target.setFileDate(source.getFileDate());
        target.setCreatorId(source.getCreatorId());
        target.setMiJiNo(source.getMiJiNo());
        target.setPersonName(source.getPersonName());
        target.setBoxNo(source.getBoxNo());
        target.setStype(source.getStype());
        target.setPagesAmount(source.getPagesAmount());
        target.setUrgency(source.getUrgency());
        target.setIsLocked(source.getIsLocked());
        target.setTextEntry(source.getTextEntry());
        target.setCreateTime(source.getCreateTime());
        target.setBaoGuanQi(source.getBaoGuanQi());
        target.setVectorForm(source.getVectorForm());
        target.setQuanZongNo(source.getQuanZongNo());
        target.setJianNo(source.getJianNo());
        target.setZeRenZhe(source.getZeRenZhe());
        target.setFenLeiNo(source.getFenLeiNo());
        target.setInputPerson(source.getInputPerson());
        target.setElectronicDoc(source.getElectronicDoc());
        target.setJiNo(source.getJiNo());
        target.setModifyId(source.getModifyId());
        target.setFileTypeId(source.getFileTypeId());
        target.setMiJiSelect(source.getMiJiSelect());
        target.setOrgId(source.getOrgId());
        target.setFileName(source.getFileName());
        target.setDescription(source.getDescription());
        target.setFenAmount(source.getFenAmount());
        target.setAttachment(source.getAttachment());
        target.setCompanyId(source.getCompanyId());
        target.setInputDate(source.getInputDate());
        target.setModifyTime(source.getModifyTime());
        target.setArchiveYear(source.getArchiveYear());
        target.setSorder(source.getSorder());
        target.setIsValid(source.getIsValid());
        target.setFileType(source.getFileType());
        target.setProcInstId(source.getProcInstId());
        target.setNumberNo(source.getNumberNo());
        target.setKeyword(source.getKeyword());
        target.setProcessDefId(source.getProcessDefId());
        target.setFormPath(source.getFormPath());
        
        return target;
    }

    public static List<AmFile> convert2AmFileList(Iterable<AmFileDO> list) {
        List<AmFile> results = new ArrayList();
        for(AmFileDO source : list) {
            results.add(convert2AmFile(source));
        }
        return results;
    }

    
    
}
        
